#include "math_3d.h"
#define GLEW_STATIC 1
#include <GL/glew.h>
#include <glut.h>
#include "Vector2D.h"
#include "Clock.h"
#include "Timer.h"
#include <assert.h>
#include <gtest/gtest.h>
#include "config.h"
#include "Windows.h"


static void GetProcessorSpeed()
{
    //CPUInfo* pInfo = this;
    LARGE_INTEGER qwWait, qwStart, qwCurrent;
    QueryPerformanceCounter(&qwStart);
    QueryPerformanceFrequency(&qwWait);
    qwWait.QuadPart >>= 5;
    unsigned __int64 Start = __rdtsc();
    do
    {
        QueryPerformanceCounter(&qwCurrent);
    }while(qwCurrent.QuadPart - qwStart.QuadPart < qwWait.QuadPart);
    printf("Processor Speed is %f GHz\n", ((__rdtsc() - Start) << 5) / 1000000000.0);
}


void Framework(int argc, char **argv);
void BasicDrawing(int argc, char **argv);
void AddingColor(int argc, char **argv);
void PackInSingleVBO(int argc, char **argv);
void UsingIndexDraw(int argc, char **argv);
void DepthTesting(int argc, char **argv);
void DynamicDataLoading(int argc, char **argv);
void UsingGlm(int argc, char **argv);

void OpenGLExample(int argc, char **argv);
void GameEngine(int argc, char** argv);



int main(int argc, char **argv)
{
	glutInit(&argc,argv);
	GetProcessorSpeed();
#if defined RUN_TESTS && RUN_TESTS > 0
	::testing::InitGoogleTest(&argc, argv);
	RUN_ALL_TESTS();
	printf("Press Enter to continue...\n");
	getchar();
#endif
	
	//AddingColor(argc,argv);
	//PackInSingleVBO(argc,argv);
	//UsingIndexDraw(argc,argv);
	//DepthTesting(argc,argv);
	//DynamicDataLoading(argc,argv);
	UsingGlm(argc,argv);

	return 0;
}
